// 类 
export class Person {
	name: string
	age: string
	sex: string
	constructor(name: string, age: string, sex: string) {
		this.name = name
		this.age = age
		this.sex = sex
	}

	sayName() {
		console.log(this.name)
	}
}




// 接口
interface AddFn {
	name: string
	age: number
	sex?: string
	readonly code: number
}

const o = {
	// 必须
	name: '张三',
	age: 18,
	// 可选
	sex: '男',
	// 只读
	code: 110
}